#include "Map.hpp"

Map::Map(string mapName, unsigned short mapWidth, unsigned short mapHeight){
    name = mapName;
    width = mapWidth;
    height = mapHeight;

    tiles = new Tile[width*height];
}

Tile& Map::operator[](unsigned short tile){
    return tiles[tile];
}

Tile& Map::getTile(unsigned short x, unsigned short y){
	return tiles[x + y*width];
}

Map::~Map(){
    delete tiles;
    tiles = 0;
}